import {createAPI, createFormAPI} from '@/utils/request'

// 服务商主体
export const getList = data => createAPI('/api/store', 'get', data)
export const getDetails = id => createAPI(`/api/store/${id}`, 'get')
export const updateData = data => createAPI(`/api/store/${data.id}`, 'put', data)
export const addData = data => createAPI(`/api/store`, 'post', data)
export const delData = id => createAPI(`/api/store/${id}`, 'delete')

// 主体用户
export const getStoreUserList = data => createAPI('/api/storeUser', 'get', data)
export const addUserData = data => createAPI('/api/storeUser', 'post', data)
export const editUserData = data => createAPI(`/api/storeUser/${data.id}`, 'put', data)
